package com.itheima.ydd.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
//配置分页插件
@Configuration
public class MybatisPlusConfig {
    @Bean
    public MybatisPlusInterceptor interceptor(){
        MybatisPlusInterceptor mybatis=new MybatisPlusInterceptor();
        mybatis.addInnerInterceptor(new PaginationInnerInterceptor());
        return mybatis;
    }
}
